import api from './api';
import { ScanResult, ApiResponse, PaginationParams, PaginationResult } from './types';

export const scanResultApi = {
  getScanResults: (params?: PaginationParams) => api.get<ApiResponse<PaginationResult<ScanResult>>>('/scan_result', { params }) as unknown as Promise<ApiResponse<PaginationResult<ScanResult>>>,
  getScanResultsByProject: (projectId: number, params?: PaginationParams) => api.get<ApiResponse<PaginationResult<ScanResult>>>(`/scan_result/project/${projectId}`, { params }) as unknown as Promise<ApiResponse<PaginationResult<ScanResult>>>,
  }; 